function drawGenderPersonalityChart(sex){
    const types = ['神经性', '外倾性', '开放性', '宜人性', '尽责性'];
    const maleData = [ 2.76, 3.23, 3.26, 3.62, 3.39];
    const femaleData = [ 2.86,  3.24,  3.24,  3.67,  3.32];
    const overallData = [ 2.81, 3.23, 3.25, 3.64, 3.35];  
    var tooltip = {
            trigger: 'axis',
        };
        var grid = {
            top: '2%',
            left: '3%',
            right: '15%',
            bottom: '10%',
            containLabel: true
        };
        var xAxis = [
            {
                type: 'category',
                boundaryGap: false,
                data: types,
                axisLabel: {
                    color: '#000',
                    fontSize: 12
                }
            }
        ];
        var yAxis = [
            {
                shou: true,
                type: 'value',
                max: 4.0,
                min: 2,
                interval: 0.2,
                axisLabel: {
                    color: '#000',
                    fontSize: 12
                }
            }
        ];
        var color = '#67ADB7';
    
        var myChart = echarts.init(document.getElementById('genderPersonalityChart'));
        //  = echarts.init(document.getElementById('sex1'));
        option1 = {
            tooltip: tooltip,
            grid: grid,
            color: color,
            xAxis: xAxis,
            yAxis: yAxis,
            series: [
                {
                    name: '总体',
                    type: 'line',
                    data: overallData
                }
            ]
        };
    
        //  = echarts.init(document.getElementById('sex2'));
        option2 = {
            tooltip: tooltip,
            grid: grid,
            color: color,
            xAxis: xAxis,
            yAxis: yAxis,
            series: [
                {
                    name: '男',
                    type: 'line',
                    data: maleData
                }
            ]
        };
      
        //  = echarts.init(document.getElementById('sex3'));
        option3 = {
            tooltip: tooltip,
            grid: grid,
            color: color,
            xAxis: xAxis,
            yAxis: yAxis,
            series: [
                {
                    name: '女',
                    type: 'line',
                    data: femaleData
                }
            ]
        };
  
    if(sex == '总体')
        myChart.setOption(option1);
    else if(sex == '男')
        myChart.setOption(option2);
    else if(sex == '女')
        myChart.setOption(option3);
        
}

